g examples that can
apply gradient colors to metapost paths.
how i can apply this cool feature to a piece of text?
i tried the code below but it does not produce any result.
\definecolor[Gleft] [h=9f9393]
\definecolor[Gright] [h=ff1aa4]
\startMPpage
picture Mytext;
Mytext := btex hello etex;
draw
=ff1aa4]
\startMPpage
picture Mytext;
Mytext := btex hello etex;
draw lmt_shade [
picture="Mytext",
direction = "right",
domain= { 0, 2 },
colors= { "headerGleft", "headerGright" },
] ;
\stopMPpage
}}
\setuptyping[TEX][
option=tex,% scite sets cld
escape=yes,
]
\starttext
\startTEX
\starttext/BTEX\SAY{Text starts here}/ETEX
\input tufte
\stoptext/BTEX\SAY{Text ends here}/ETEX
\stopTEX
\stoptext
I tried to load the module only in the section where I need it, that
lead to strange errors
=yes,
]
\starttext
\startTEX
\starttext/BTEX\SAY{Text starts here}/ETEX
\input tufte
\stoptext/BTEX\SAY{Text ends here}/ETEX
\stopTEX
\stoptext
___
If your question is of interest to others as well, please add
s abit special in te xdue to the fact thet some numbers
en dup in registers and others as token list (string). I have considered
changing that but it would also break some 'testing for tex version' so
for now we have to accept this mix of tex/etex/pdftex
lft("A", p) ;
>>label.lrt("D", p) ;
>>label.ulft("B", p) ;
>>label.urt("C", p) ;
>>label.lft("M", z[2]) ;
>>label.ulft("N", z[1]) ;
>>
gt;>>draw p ;
>>>
>>>label.llft("A", p) ;
>>>label.lrt("D", p) ;
>>>label.ulft("B", p) ;
>>>label.urt("C", p) ;
>>>
t;label.urt("C", p) ;
>label.lft("M", z[2]) ;
>label.ulft("N", z[1]) ;
> label.bot("P", z[0]) ;
>lab
label.lrt("D", p) ; label.ulft("B", p) ; label.urt("C", p) ; label.lft("M", z[2]) ; label.ulft("N", z[1]) ; label.bot("P", z[0]) ; label.top("J", ulcorner r) ; label.rt("I&
quot;M", z[2]) ;
label.ulft("N", z[1]) ;
label.bot("P", z[0]) ;
label.top("J", ulcorner r) ;
label.rt("I", lrcorner r) ;
label.bot(btex $x$ etex,(llcorner p+z[0])/2
to delve into what exactly caused
its demise or if it was simply the after effect of other projects
that contributed to it. It's irrelevant.
Hm, its time span was not that short ... I first heard of omega at the
eurotex meeting in arnhem where also etex was discussed (and you
dont'want me to cite
> return {
> >content = {
> > variables = {
> > },
> >},
> > }
> >
> > which is useless
>
> and harmless (somethign old texlive)
>
> > so, no bueno. Not when the aim is to install a fully functional context
> > sta
Now let's take a peek instide and see the binaries
afm2tfm etex kpsereadlink mfmtxrun.lua texluac
bibtex extractbb kpsestat mf-nowin pdfetex tlmgr
context fmtutil kpsewhichmft pdflatextlshell
context.lua fmtutil-sys
t texmf.cnf
that texmfcnf.lua only holds
return {
content = {
variables = {
},
},
}
which is useless
so, no bueno. Not when the aim is to install a fully functional context
standalone
Now let's take a peek instide and see the binaries
afm2tfm etex kpsereadlink m
adjust.
i'll add the period; btw afaikt testing for an etex version is useless
because all used engines have it and there is basically only one version
and there will be no follow ups
Hans
-
; \par
> \stopTEXpage
> }
>
> \stoptext
>
> it's an addendum to the widowpenalties and clubpenalties introduced by
> etex but this time it's horizontal; the orphan penalties will be
> inserted before spaces (aka spaceskip, xspaceskip and zerospaceskip
&
3000 2000 1000\relax
\updateparagraphpenalties
\samplefile{tufte}
\par
\stopTEXpage
}
\stoptext
it's an addendum to the widowpenalties and clubpenalties introduced by
etex but this time it's horizontal; the orphan penalties will be
inserted before spaces (aka
a missing file (I'll make it return a different
message but still one needs to be aware of the fact that fiel reading in
mp is kind of weird so it really expects a file).
That said, there are some issues that you need to sort out: no btex/etex
and no TEX command but textext instead. You could ask
the are implemented and the way
TeX (the engine) works when it reads arguments.
and, also in mkiv \dofmode is unexpandable so cannot act as keyword
(it might not crash but also doesn't work)
Here is a short example which demonstrates the differences between
LuaTeX (eTeX, pdfTeX etc.) and LuaMetaTeX
rse the first line of an input file for
% the % construct.
parse_first_line = t
% But don't parse the first line if invoked as "tex", since we want that
% to remain Knuth-compatible. The src_specials and
% file_line_error_style settings, as well as the options -enctex,
% -mltex, -8bit,
On 4/26/2021 12:23 PM, Floris van Manen wrote:
\starttext
\starttyping[escape=@]
1 137 26 25 > 1 69 32
2 @btex@bgroup@red@bf 137 @egroup@etex 26 25 > 1 69 32
3 @btex@bgroup@red@bf 137 @egroup@etex 26 25 > 1 69 32
4 137 26 25 > 1 69 32
Aparently all spaces after @etex get reduced to one only.
I'd expect that to happen inside @btex and @etex
\starttext
\starttyping[escape=@]
1 137 26 25 >1 69 32
2 @btex@bgroup@red@bf 137 @egroup@etex 26 25 >1 69 32
3 @btex@bgroup@red@bf 137 @egroup@etex
On 26/04/2021 10:59, Hans Hagen wrote:
\starttext
\starttyping[escape=/]
one two three
four /btex/bgroup/red five /egroup/etex six
seven eight nine
\stoptyping
\stoptext
That works indeed! Thanks.
Are there restriction on what context commands can be given inside the
bgroup? e.g. I tried
=/]
one two three
four /btex/bgroup/red five /egroup/etex six
seven eight nine
\stoptyping
\stoptext
-
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
==
LuaTeX 1.13.1 2021-04-02
==
Fixed an unwanted space in btex etex in metapost, introduced
after a patch for troff.
--
luigi
some prefixes that we never used in
context anyway), some etex enhancements brought new primitives (some
make no sense in the luametex universe but one can always fake
something), some auxiliary pdftex primitives never were available in
lua(meta)tex because we have lua, and from omega/aleph we
the meantime we got etex extensions, which
adds a few more, and then pdftex ades some, as well as omega and after
that of course luatex. In luametatex we dropped some, and added others,
so there we currently have 770 primitives. The increase of number is
partly due to the 166 extra math related
\expandafter{\TeX}
\blank
\tex{TeX} = \detokenize{\TeX}
\stoptext
To make it easier to keep the command eTeX added a new command
\protected which can be used before \def to achieve this (ConTeXt
provides the same thing under the name \unexpanded).
The following example shows how you can use
{\TeX}
\stoptext
To make it easier to keep the command eTeX added a new command
\protected which can be used before \def to achieve this (ConTeXt
provides the same thing under the name \unexpanded).
The following example shows how you can use \protected\def to keep
always the current meaning
and one can be pretty sure that we then
don't have a proper csname. This is why in luatex we have a catch for
running wild csname checking.
The original \ifcsname test was inherited from etex. The \protected
feature also comes from etex. But \csname is a tex natural.
In pdftex (and luatex
then don't have a proper
csname. This is why in luatex we have a catch for running wild csname
checking.
The original \ifcsname test was inherited from etex. The \protected
feature also comes from etex. But \csname is a tex natural.
In pdftex (and luatex) a protected macro inside an \(if)csname does
On 8/3/2020 7:57 PM, Marcel Fabian Krüger wrote:
Hi,
recent LuaMetaTeX versions no longer automatically resize the fontdimen
arrays on assignments.
indeed, using font dimens for other purposes than fonts is pre-etex
hackery that (c|sh)ould have been abandoned decades ago
Is there a way
On 29/03/20 07:06, Gerben Wierda wrote:
I’m trying in METAPOST to build a command to pass on to ConTeXt using
btex/etex.
picture p; p := scantokens( "btex " & texcommands & " etex”);
btex/etex is better replaced by textext().
Nevertheless, this does not change anyth
\eTeXglue[stretch|shrink]order for querying order
the etex way.
Extra features runtoks
tex.getmodenames() (as these can differ per engine/version)
Permit nested runtoks in more complex situations of nesting (HH)
More accurate and correct test for tex.[set|get]math
Minor clean-up and bugs fixed
We should move this to the thread
What alternative for scantokens( "btex " & texcommands & " etex”)?
I’ve put my vardef there. The calls to this vardef are created by lua code.
I need to fix two things: use a string variable to build a btex-etex construct
and be a
I’m trying in METAPOST to build a command to pass on to ConTeXt using btex/etex.
picture p; p := scantokens( "btex " & texcommands & " etex”);
with texcommands a variable that holds a string of TeX commands doesn’t work.
The METAPOST parser complains about not finding e
ore Bar and not “ which is the problem.
Yes, I am aware that that is my problem. It is just that I do not have
the luxury to decide myself what will be put in the string. It must work
for any string. So, I will have to be putting that string to \type and
make sure that is used as the label.
Yves Cloutier schrieb am 15.03.2020 um 16:09:
Hello Wolfgang, after a few attempts that didn't work I copy-pasted the
example from the wiki:
\definetyping[C][option=commands] \startC #include int main(){
return 0; /BTEX{\em unreachedCode;}/ETEX } \stopC
This did not work.
However
Hello Wolfgang, after a few attempts that didn't work I copy-pasted the
example from the wiki:
\definetyping[C][option=commands]\startC
#include
int main(){
return 0;
/BTEX{\em unreachedCode;}/ETEX}\stopC
This did not work.
However following the example you provided this works
.
\starttext
\starttyping[escape=yes]
This is /BTEX\bf formatted/ETEX text.
\stoptyping
\starttyping[escape={<<,>>}]
This is <<\bf formatted>> text.
\stoptyping
\starttyping[escape={}]
This is text.
\stoptyp
till people trying to run TikZ on plain TeX with the Knuth
>> engine: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=920368
>
> hm, so you can't actually use etex goodies unless you emulate them
>
>>> \newcount\eTeXversion \eTeXversion = 2000
>>> \newcount\eTeXre
On 3/10/2020 11:32 AM, Henri Menke wrote:
There are still people trying to run TikZ on plain TeX with the Knuth
engine: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=920368
hm, so you can't actually use etex goodies unless you emulate them
\newcount\eTeXversion \eTeXversion = 2000
On 10/03/20, 10:01, Hans Hagen wrote:
> On 3/9/2020 10:59 PM, Jorge Manuel wrote:
>
> > \pgfutil@packageerror #1#2#3->\errhelp {#3}\errmessage {Package #1
> > Error: #2}
> > l.11 \pgfutil@packageerror{PGF}{PGF req
On 3/9/2020 10:59 PM, Jorge Manuel wrote:
\pgfutil@packageerror #1#2#3->\errhelp {#3}\errmessage {Package #1
Error: #2}
l.11 \pgfutil@packageerror{PGF}{PGF requires etex in extended mode}{}
%
This error mess
.def'
close source> level 8, order 12, name 'pgfutil-context.def'
open source > level 8, order 13, name 'pgfrcs.code.tex'
tex error > tex error on line 11 in file pgfrcs.code.tex: ! Package PGF
Error:
eTeX.
A new callback lua.getcodepage() for diagnostic purposes.
*** DROPPED the "page_objnum_provider" callback, replaced with
"page_order_index". ***
See ChangeLog and the manual.
--
luigi
label.llft(btex \m{O} etex,origin) ;
Wolfgang
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpa
(90+alpha)}
withcolor \MPcolor{darkred} ;
drawdot origin withpen pencircle scaled 2pt ;
drawdot 0.7cm*dir 0 withpen pencircle scaled 2pt ;
label.llft(btex \m{O} etex,origin) ;
label.rt(btex \m{A} etex,0
On Sun, 11 Aug 2019 11:12:55 -0700
Henri Menke wrote:
> Thank you for the quick repsonse. This looks good to me. However,
> could you tell me a way to get the correct baseline with textext? When
> I use
>
> \startMPpage
> draw btex dummy etex shifted (0,0);
>
On 8/11/19 10:51 AM, Hans Hagen wrote:
> I'll do this (lmtx):
>
> metapost> use 'textext(.)' instead of 'btex . etex'
> metapost> rewrapping btex ... etex at the outer level [[dummy]]
> metapost> rewrapping btex ... etex at the outer le
on
https://tex.stackexchange.com/questions/503773/strange-behaviour-of-the-btex-etex-construct
Cheers, Henri
---
\starttext
\startMPpage
def drawtest(expr i) = %i is not used here
draw btex dummy etex shifted (0,0);
draw btex foo etex shifted (1.5cm,0);
draw btex bar
/questions/503773/strange-behaviour-of-the-btex-etex-construct
Cheers, Henri
---
\starttext
\startMPpage
def drawtest(expr i) = %i is not used here
draw btex dummy etex shifted (0,0);
draw btex foo etex shifted (1.5cm,0);
draw btex bar etex shifted (3cm,0);
enddef;
drawtest(5
_name->jobname
{("test")&("-mpgraph.mpo")}
{let}
{fi}
draw->addto.currentpicture.if.picture(EXPR0):also(EXPR0)else:doublepath(E
XPR0)withpen.currentpen.fi._op_
textext@#(EXPR3)->begingroup.save._s_;string._s_;interim.labeloffset:=textextof
fset;noftexpictures:=noftexpict
aled (7cm,3cm) shifted(2cm,2cm) ;
> b := z[2]--z[1]--ulcorner r--urcorner p--lrcorner r--z[1]--z[0]--llcorner
> p--cycle ;
> draw p ;
> draw b numberstriped (.25,15,5) withcolor magenta ;
> label.llft("A", p) ;
> label.lrt("D", p) ;
> label.ulft("
abel.urt("B", p) ;
label.lft("M", z[2]) ;
label.ulft("N", z[1]) ;
label.bot("P", z[0]) ;
label.top("J", ulcorner r) ;
label.rt("I", lrcorner r) ;
label.bot(btex $x$ etex,(llcorner p+z[0])/2);
label.lft(btex $x$ etex,(llcorner p+z[2])/2);
ot;D", p) ;
> label.ulft("C", p) ;
> label.urt("B", p) ;
> label.lft("M", z[2]) ;
> label.ulft("N", z[1]) ;
> label.bot("P", z[0]) ;
> label.top("J", ulcorner r
A", p) ;
label.lrt("D", p) ;
label.ulft("C", p) ;
label.urt("B", p) ;
label.lft("M", z[2]) ;
label.ulft("N", z[1]) ;
label.bot("P", z[0]) ;
label.top("J", ulcorner r) ;
label.rt("I", lrcorner r) ;
l
ve 2019/dev)
>
> The LuaTeX team is Hans Hagen, Hartmut Henkel, Taco Hoekwater, Luigi
> Scarso.
>
> LuaTeX merges and builds upon (parts of) the code from these projects:
>
> tex : Donald Knuth
> etex : Peter Breitenlohner, Phil Taylor and friends
> omega : John Plaice and
and builds upon (parts of) the code from these projects:
tex : Donald Knuth
etex : Peter Breitenlohner, Phil Taylor and friends
omega : John Plaice and Yannis Haralambous
aleph : Giuseppe Bilotta
pdftex: Han The Thanh and friends
kpathsea : Karl Berry, Olaf Weber and
Dear Henri Menke,
I always use “btex etex” for labeling math.
But “…..” is simpler and it works fine.
Thank you.
Best regards,
Dalyoung
>>
>> \startbuffer[delta]
>> label.bot(btex ${\delta}$ etex, (1cm,0));%
>> %label.bot(btex $\delta$ etex, (3cm,0));
>
&g
> On 7 Sep 2018, at 01:02, Henri Menke wrote:
>
>> label.bot(btex ${\delta}$ etex, (1cm,0));%
>> %label.bot(btex $\delta$ etex, (3cm,0));
>
> Why not just
>
> label.bot("$\delta$", (3cm,0));
Sometimes, one might want to use btex ... etex t
On 07/09/18 10:55, Jeong Dal wrote:
> Hi,
>
> What is the difference between {\delta} and \delta?
> Former is OK, but the second is not compiled.
>
> Here is a MWE.
>
>
> \startbuffer[delta]
> label.bot(btex ${\delta}$ etex, (1cm,0)); %
> %label.bot(b
Hi,
What is the difference between {\delta} and \delta?
Former is OK, but the second is not compiled.
Here is a MWE.
\startbuffer[delta]
label.bot(btex ${\delta}$ etex, (1cm,0)); %
%label.bot(btex $\delta$ etex, (3cm,0));
label.bot(btex $\frac{2-\delta}{2}$ etex, (5cm,0
, the file compiles.
use
textext("$\alpha$")
%%%
\starttext
\startuseMPgraphic{testfig}
u:=1cm;
z0=origin;
z1=(4u,3u);
z2=(4u,0);
draw z0--z1--z2--cycle;
draw anglebetween(z0--z2,z0--z1,btex $\alpha$ etex);
\stopuseMPgraphic
\startplacefigure
\useMPgraphic{testfig}
\stopplacefigure
{testfig}
u:=1cm;
z0=origin;
z1=(4u,3u);
z2=(4u,0);
draw z0--z1--z2--cycle;
draw anglebetween(z0--z2,z0--z1,btex $\alpha$ etex);
\stopuseMPgraphic
\startplacefigure
\useMPgraphic{testfig}
\stopplacefigure
\stoptext
%%%
The error is something like:
tex error > tex error on line 7 in f
On 7/17/2018 3:40 PM, Procházka Lukáš Ing. wrote:
Hello,
I encountered a weird thing - words of 1 letter inside btex ... etex
within MP are not shown - check:
\setuplayout[page]
\startluacode
context.setMPtext("Pare", "1")
context.setMPtext("Pare2&quo
Hello,
I encountered a weird thing - words of 1 letter inside btex ... etex within MP
are not shown - check:
\setuplayout[page]
\startluacode
context.setMPtext("Pare", "1")
context.setMPtext("Pare2", "22")
context.setMPtext("Pare3"
page
>>>
>>> Is there anything I can do or is it a problem of the source?
>>
>>
>> checking now
>>
>> --
>> luigi
>>
>
>The example is ok on my Raspberry Pi 3 Model B Rev 1.2
>I assume luatex experimental, because luatex trunk is st
v 1.2
I assume luatex experimental, because luatex trunk is still with poppler .
# luatex --credits
This is LuaTeX, Version 1.09.0 (TeX Live 2018)
The LuaTeX team is Hans Hagen, Hartmut Henkel, Taco Hoekwater, Luigi Scarso.
LuaTeX merges and builds upon (parts of) the code from these projects:
luatex --credits gives:
This is LuaTeX, Version 1.09.0 (TeX Live 2018)
The LuaTeX team is Hans Hagen, Hartmut Henkel, Taco Hoekwater, Luigi Scarso.
LuaTeX merges and builds upon (parts of) the code from these projects:
tex : Donald Knuth
etex : Peter Breitenlohner, Phil Taylor
value) for subsequent calls to MP.
What should be understood is that calls to MP returns a bounding box to
TeX, and space is reserved for this bounding box. Likewise, calls
within MP to TeX, for example textext() or label(), or btex ... etex
returns a bounding box to MP, and this (picture) object
ample#1{%
> \startTEX
> #1
> \stopTEX
> #1
> }
>
> Stops with the error:
Without or without definitions, there should be no expansion inside
\starttyping...\stoptyping.
Even with some expansion, I get an infinite loop:
\starttext
\setuptyping[TEX][escape=yes]
\def\CodeEx
nd the code?
Background is no problem, escape in code is not implemented in t-vim. I filed
a feature request for
/BTEX ... /ETEX escaping as in regular typing on Aditya's GitHub:
https://github.com/adityam/filter/
issues/23
\definetextbackground
[verbatim]
[location=paragraph]
\usemodu
);
draw thelabel(btex\setupbodyfont[sans,35mm] Test etex, (80mm, 50mm))
withcolor %col
transparent(1, .4, col)
;
\stopuseMPgraphic
\defineoverlay[T][\useMPgraphic{T}]
\setupbackgrounds[page][background={foreground,T}]
\startTEXpage[width=200mm,height=200mm]
\stopTEXpage
On 1/11/2017 11:08 PM, Sergey Slyusarev wrote:
Hi, i found the following bug (likely) some time ago:
When \textext (or any other text generating thing like btex etex etc.)
is present inside \*MPinclusions and \*MPinclusions are followed by
\*MPcode ConTeXt returns error:
Equation cannot
Hi, i found the following bug (likely) some time ago:
When \textext (or any other text generating thing like btex etex etc.) is
present inside \*MPinclusions and \*MPinclusions are followed by \*MPcode
ConTeXt returns error:
Equation cannot be performed (color=vacuous).
Minimal example would
?
%%% Start of example
\usemodule[newcolumnsets]
\setuplayout[
grid=yes,
]
\showgrid
\definecolumnset[example][n=2]
\definecolumnsetspan[intro][n=2,after=,before=,]
\define[1]\mychapnum{%
\startuseMPgraphic{chapnum}
label(btex {\bf #1} etex scaled 12,
(0.5*OverlayWidth,0.5*OverlayHeight)) withcolor
| running command: xetex --ini --etex --8bit
cont-en.mkii \dump
makes vista complain:
=
xetex.exe - Unable to Locate Component
This application has failed to start because xetex.dll was not found.
=
Pressing OK, xetex crashes and things continue until
2. m
Dear syndicate,
As mentioned in my other message, "first-setup.bat weirdness I: cloned
system" I've now switched to the first-setup.bat way of updating. Two
pieces of weirdness on the main machine:
1. mtx-context | running command: xetex --ini --etex --8bit
cont-en.mkii \du
bat again on the windows7 machine,
got the following errors:
=
mtx-context | running command: pdftex --ini --etex --8bit cont-en.mkii
\dump
warning: c:/ConTeXt/tex/texmf/web2c/texmf.cnf:49: (kpathsea) No cnf value
on lin
e: OSFONTDIR =.
This is pdfTeX, Version 3.14159265-2.6-1.4
Nicola <mailto:nvitacolo...@gmail.com>
13. April 2016 um 19:25
Thanks for your answers. I'd like to go with \definetyping then, because
I need /BTEX../ETEX. I have found an old document of mine, which uses a
(slightly customized) pret-c.lua, located inside the project's folder.
It co
) ... the pret files are more or less
working in the same way (they date from before scite got that kind of
lexers)
Thanks for your answers. I'd like to go with \definetyping then, because
I need /BTEX../ETEX. I have found an old document of mine, which uses a
(slightly customized) pret-c.lua, located
environments, like /BTEX../ETEX in built-in typing?
hm, i suppose one can add the parsing of /BTEX .. /ETEX to the lexer and
then intercept it but it's not built in (formatted comment might make
sense)
4) Are scite lexers documented somewhere besides the source code?
no
5) May I rely
. It there a way to have it in my project's folder
instead?
2) How do I customize colors?
3) Is it possible to embed TeX commands in \startscite..\stopscite
environments, like /BTEX../ETEX in built-in typing?
4) Are scite lexers documented somewhere besides the source code?
5) May I rely
ot;\input knuth") ;
\stopMPcode
that can be substituted for the traditional MP
\startMPcode
label("Some text to be typeset", origin) ;
\stopMPcode
or its alternate form:
\startMPcode
label(btex $5\times10^4$ etex, origin) ;
\stopMPcode
In MetaFun, these all go through the te
{of BTU}} etex, OUT);
path p[];
numeric t;
gdata(energy.d, $,
t:=0; augment.p1($1,0);
for j=2 upto 5:
t:=t+scantokens $[j]; augment.p[j]($1,t);
endfor)
picture lab[];
lab2=btex coal etex; lab3=btex crude oil etex;
lab4=btex natural gas etex; lab5=btex hydroelectric etex
Hello,
Is it possible to calculate the position of something in Metapost, and
to export that value to TeX such that I can use it in setups and
things?
I thought perhaps I could \def inside btex..etex. Here's a minimal
example trying to illustrate the idea:
\startuniqueMPgraphic{canon}
path
;
label.bot(btex $x$ etex,(2.97u,-0.1v)) ;
label.rt(btex $y$ etex,(0.01u,3.9v)) ;
label.llft(0,(0,0)) ;
label.urt(A,(0,v)) ;
dotlabel(,(u,-4v)) ;
label.rt(C,(1.02u,-4v)) ;
dotlabel.lrt(B,(2u,3v)) ;
label.bot(1,(u,0)) ;
label.lft(1,(0,v)) ;
clip
)--(0,4v) ;
draw curvedfunction (x, 3*x*x-5*x+1, -1, 3, 0.01) xyscaled (u,v)
withcolor red ;
draw curvedfunction (x, -5*x+1, -1, 3, 0.01) xyscaled (u,v)
withcolor blue ;
draw curvedfunction (x, 7*x-11, -1, 3, 0.01) xyscaled (u,v)
withcolor green ;
label.bot(btex $x$ etex,(2.97u,-0.1v
);
for i=0 step 10 until 100:
label.bot(TEX($decimal(i)$),(i*u,0));
endfor;
for i=0 step 1000 until 7000:
label.lft(TEX($decimal(i)$),(0,i*v));
endfor;
label.top(Nombre de lots,(90u,50v));
label.lrt(btex $f(x)$ (en euros) etex,(0,7800v));
\stopMPcode
\stop
);
for i=0 step 10 until 100:
label.bot(TEX($decimal(i)$),(i*u,0));
endfor;
for i=0 step 1000 until 7000:
label.lft(TEX($decimal(i)$),(0,i*v));
endfor;
label.top(Nombre de lots,(90u,50v));
label.lrt(btex $f(x)$ (en euros) etex,(0,7800v));
\stopMPcode
\stop
));
label.lrt(btex $f(x)$ (en euros) etex,(0,7800v));
\stopMPcode
\stop
\stoptext
what is:
input hvdm;
input tex;
both names are also candidates for name clashes
Hans
-
Hans
On 2/9/2015 3:30 PM, Fabrice Couvreur wrote:
Hi,
How hatched trapezoid MBCD?
Best regards,
Fabrice
\starttext
\startMPcode
path p ;
p=unitsquare scaled 4cm ;
draw p ;
pair z ;
z=point 3.6 of p ;
draw z--urcorner p ;
label.llft(btex B etex,llcorner p) ;
label.lrt(btex C etex,lrcorner p
Hi,
How hatched trapezoid MBCD ?
Best regards,
Fabrice
\starttext
\startMPcode
path p ;
p=unitsquare scaled 4cm ;
draw p ;
pair z ;
z=point 3.6 of p ;
draw z--urcorner p ;
label.llft(btex B etex,llcorner p) ;
label.lrt(btex C etex,lrcorner p) ;
label.ulft(btex A etex,ulcorner p) ;
label.urt(btex
:
random_vector[i] = candidate;
drawarrow candidate withcolor random_color;
freelabel(btex $v$ etex, point .5 of candidate, point .5 of
candidate + dir (random_angle + 90));
i := i+1;
fi;
endfor;
\stopMPcode
\stoptext
bb(candidate) (-1, -1):
intersect := true;
fi;
j := j+1;
endfor;
if intersect = false:
random_vector[i] = candidate;
drawarrow candidate withcolor random_color;
freelabel(btex $v$ etex, point .5 of candidate, point .5 of candidate
+ dir (random_angle
On Wed, 28 Jan 2015, Keith Schultz wrote:
label(\sometxt{Cn},origin) withcolor white;
Note that in MkIV, this can be shortened to
label(Cn, origin) withcolor white;
No need to wrap the strings around \sometxt{...} or btex ... etex.
Aditya
\starttext
\startMPcode
u:=1cm ;
path p, q ;
p=fullsquare scaled u ;
q=fullsquare scaled u shifted (4u,-2u) ;
draw p ;
draw q ;
drawarrow center p--center q ;
label(btex $5$ etex,center p) ;
label(btex $-2 $ etex,center q) ;
\stopMPcode
\stoptext
How about something like below
like in
the code below.
\starttext
\startMPcode
u:=1cm ;
path p, q ;
p=fullsquare scaled u ;
q=fullsquare scaled u shifted (4u,-2u) ;
draw p ;
draw q ;
drawarrow center p--center q ;
label(btex $5$ etex,center p) ;
label(btex $-2 $ etex,center q) ;
\stopMPcode
\stoptext
Best regards,
Fabrice
llcircle scaled 2u shifted (1u,0) withcolor lightgray ;
fill lrcircle scaled 4u shifted (1u,1u) withcolor lightgray ;
fill urcircle scaled 6u shifted (0,1u) withcolor lightgray ;
label.lft(btex $x$ etex, (0,0.5u)) ;
fill unitsquare scaled 1u withcolor lightgray ;
draw unitsquare scaled 1u ;
draw (-4u
1 - 100 of 836 matches
Mail list logo